﻿using System.Collections.Generic;

namespace ProjectAutumn.Input
{
    public class KeyboardState
    {
        private readonly Dictionary<Keys, bool> keyState;
        public KeyboardState(Dictionary<Keys, bool> keyState)
        {
            this.keyState = keyState;
        }
        public bool IsDown(Keys key)
        {
            return keyState.ContainsKey(key) && keyState[key];
        }
        public bool IsUp(Keys key)
        {
            return !IsDown(key);
        }
    }
}
